import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import store from './store'
Vue.config.productionTip = false

import reqUrl from "./common/reqUrl"
Vue.prototype.serverUrl = reqUrl

import regX from './common/regX'
Vue.prototype.regX = regX

import request from "./common/request";
Vue.prototype.$http = request

import User from "./common/user"
Vue.prototype.User = User


import util from './common/util.js'
Vue.prototype.util = util

//导入其它字体css
import './static/fonts/staatliches.css'

Vue.prototype.limit = 15;

Vue.prototype.wxAppId = 'wx3ab17c11c6870f89';

Vue.prototype.kfTel = '400-009-6079';
Vue.prototype.ossUrl = 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/'
Vue.prototype.defHead = Vue.prototype.ossUrl + 'userHead/default_head.png';
Vue.prototype.gzcpUrl = 'https://evalapi.wtcxlw.com/statics/scale/ScalePic';
Vue.prototype.cloudUrl = __wxConfig.envVersion === 'develop' ? 'https://test-1309823386.cos.ap-beijing.myqcloud.com/' : 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/'
Vue.prototype.shareDefNews = 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/zongzhi/share_news.jpg';
Vue.prototype.shareDefGrid = 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/zongzhi/share_grid.jpg';
Vue.prototype.shareDefAnsQue = 'https://hxy2022-1309823386.cos.ap-beijing.myqcloud.com/zongzhi/share_ansque.jpg';

Vue.prototype.jmRole = '居民';
Vue.prototype.zxsRole = '咨询师';
Vue.prototype.gzzRole = '服务工作者';
Vue.prototype.getCloudFilePath = function(url){
	if(url != undefined){
		if(url.startsWith('https')){
			return url
		}else{
			return Vue.prototype.cloudUrl + url
		} 
	}
}

App.mpType = 'app'
const app = new Vue({
	store,
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif